import service from "../util/service.js";
//封装相关数据请求

let link = (url, method = "GET", data, params, responseType = "json") => {
  return new Promise((resolve, reject) => {
    service.request({
      url,
      method,
      data,
      params,
      responseType
    }).then((ok) => {
      resolve(ok)
    }).catch((err) => {
      reject(err)
    })
  })
}

export default link